import request from '@/utils/request'

// 查询司机列表
export function listDrivers(query) {
  return request({
    url: '/system/drivers/list',
    method: 'get',
    params: query
  })
}

export function getDriverInfoList(paramName) {
  return request({
    url: '/system/drivers/getDriverInfoList',
    method: 'post',
    data: {paramName}
  })
}

// 查询司机详细
export function getDrivers(id) {
  return request({
    url: '/system/drivers/' + id,
    method: 'get'
  })
}

// 新增司机
export function addDrivers(data) {
  return request({
    url: '/system/drivers',
    method: 'post',
    data: data
  })
}

// 修改司机
export function updateDrivers(data) {
  return request({
    url: '/system/drivers',
    method: 'put',
    data: data
  })
}

// 删除司机
export function delDrivers(id) {
  return request({
    url: '/system/drivers/' + id,
    method: 'delete'
  })
}


// 获取司机信息
export function getDriverInfoPhone() {
  return request({
    url: '/system/drivers/driverInfoPhone',
    method: 'get'
  })
}

// 更新司机信息
export function updateDriverInfoPhone(data) {
  return request({
    url: '/system/drivers/updateDriverPhone',
    method: 'put',
    data: data
  })
}
